<?php
/**
 * 创建订单限制配置
 */

namespace Biz\pockets\constInterface;

use Doraemon\pockets\constInterface\AppType;

interface OrderLimitConfig
{

    const LIMIT_ACTIVITY = 'activity';//活动
    const LIMIT_APP_TYPE = 'app_type';//订单来源（即：appType）
    const LIMIT_DISCOUNT = 'discount';//优惠（店铺优惠券，平台优惠券，积分）

    //使用配置
    const LIMIT_CONFIG = [
        ActivityInfo::ACTIVITY_TYPE_NORMAL => [
            self::LIMIT_ACTIVITY => [
                ActivityInfo::ACTIVITY_TYPE_NORMAL,
                ActivityInfo::ACTIVITY_TYPE_FULL_SHIPPING,
            ],
            self::LIMIT_APP_TYPE => [
                AppType::APPTYPE_IOS,
                AppType::APPTYPE_ANDROID,
                AppType::APPTYPE_MINIPROGRAM,
                AppType::APPTYPE_TUAN_MINIPROGRAM,
                AppType::APPTYPE_PARAGRAPH_MINIPROGRAM
            ],
            self::LIMIT_DISCOUNT => [
                OrderDiscountInfo::DISCOUNT_SHOP_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_INTEGRAL,
                OrderDiscountInfo::DISCOUNT_HHZ_RED_PACKET,
            ],
        ],
        ActivityInfo::ACTIVITY_TYPE_LIMIT_TIME_ROB => [
            self::LIMIT_ACTIVITY => [
                ActivityInfo::ACTIVITY_TYPE_LIMIT_TIME_ROB,
                ActivityInfo::ACTIVITY_TYPE_FULL_SHIPPING,
            ],
            self::LIMIT_APP_TYPE => [
                AppType::APPTYPE_IOS,
                AppType::APPTYPE_ANDROID,
                AppType::APPTYPE_MINIPROGRAM,
                AppType::APPTYPE_PARAGRAPH_MINIPROGRAM,
            ],
            self::LIMIT_DISCOUNT => [
            ],
        ],
        ActivityInfo::ACTIVITY_TYPE_ZHUYOUJINTIE => [
            self::LIMIT_ACTIVITY => [
                ActivityInfo::ACTIVITY_TYPE_ZHUYOUJINTIE,
                ActivityInfo::ACTIVITY_TYPE_FULL_SHIPPING,
            ],
            self::LIMIT_APP_TYPE => [
                AppType::APPTYPE_IOS,
                AppType::APPTYPE_ANDROID,
                AppType::APPTYPE_MINIPROGRAM,
                AppType::APPTYPE_PARAGRAPH_MINIPROGRAM,
            ],
            self::LIMIT_DISCOUNT => [
                OrderDiscountInfo::DISCOUNT_HHZ_COUPON,
            ],
        ],
        ActivityInfo::ACTIVITY_TYPE_MEAL => [
            self::LIMIT_ACTIVITY => [
                ActivityInfo::ACTIVITY_TYPE_MEAL,
                ActivityInfo::ACTIVITY_TYPE_FULL_SHIPPING,
            ],
            self::LIMIT_APP_TYPE => [
                AppType::APPTYPE_IOS,
                AppType::APPTYPE_ANDROID,
            ],
            self::LIMIT_DISCOUNT => [
                OrderDiscountInfo::DISCOUNT_HHZ_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_INTEGRAL,
                OrderDiscountInfo::DISCOUNT_HHZ_RED_PACKET,
            ],
        ],
        ActivityInfo::ACTIVITY_TYPE_WEEK_PURCHASE => [
            self::LIMIT_ACTIVITY => [
                ActivityInfo::ACTIVITY_TYPE_WEEK_PURCHASE,
                ActivityInfo::ACTIVITY_TYPE_FULL_SHIPPING,
            ],
            self::LIMIT_APP_TYPE => [
                AppType::APPTYPE_IOS,
                AppType::APPTYPE_ANDROID,
                AppType::APPTYPE_MINIPROGRAM,
                AppType::APPTYPE_PARAGRAPH_MINIPROGRAM,
            ],
            self::LIMIT_DISCOUNT => [
                OrderDiscountInfo::DISCOUNT_SHOP_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_INTEGRAL,
                OrderDiscountInfo::DISCOUNT_HHZ_RED_PACKET,
            ],
        ],
        ActivityInfo::ACTIVITY_TYPE_TUAN => [
            self::LIMIT_ACTIVITY => [
                ActivityInfo::ACTIVITY_TYPE_TUAN,
                ActivityInfo::ACTIVITY_TYPE_FULL_SHIPPING,
            ],
            self::LIMIT_APP_TYPE => [
                AppType::APPTYPE_TUAN_MINIPROGRAM,
            ],
            self::LIMIT_DISCOUNT => [
            ],
        ],
        ActivityInfo::ACTIVITY_TYPE_NEWCOMER_EXCLUSIVE => [
            self::LIMIT_ACTIVITY => [
                ActivityInfo::ACTIVITY_TYPE_NEWCOMER_EXCLUSIVE,
                ActivityInfo::ACTIVITY_TYPE_FULL_SHIPPING,
            ],
            self::LIMIT_APP_TYPE => [
                AppType::APPTYPE_IOS,
                AppType::APPTYPE_ANDROID,
                AppType::APPTYPE_MINIPROGRAM,
                AppType::APPTYPE_PARAGRAPH_MINIPROGRAM
            ],
            self::LIMIT_DISCOUNT => [
                OrderDiscountInfo::DISCOUNT_SHOP_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_INTEGRAL,
            ],
        ],
        ActivityInfo::ACTIVITY_TYPE_PINTUAN => [
            self::LIMIT_ACTIVITY => [
                ActivityInfo::ACTIVITY_TYPE_PINTUAN,
                ActivityInfo::ACTIVITY_TYPE_FULL_SHIPPING,
            ],
            self::LIMIT_APP_TYPE => [
                AppType::APPTYPE_IOS,
                AppType::APPTYPE_ANDROID,
                AppType::APPTYPE_MINIPROGRAM,
            ],
            self::LIMIT_DISCOUNT => [
            ],
        ]
    ];

    const LIMIT_APPTYPE_CONFIG = [
        AppType::APPTYPE_IOS => [
            self::LIMIT_DISCOUNT => [
                OrderDiscountInfo::DISCOUNT_SHOP_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_INTEGRAL,
                OrderDiscountInfo::DISCOUNT_HHZ_RED_PACKET,
            ],
        ],
        AppType::APPTYPE_ANDROID => [
            self::LIMIT_DISCOUNT => [
                OrderDiscountInfo::DISCOUNT_SHOP_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_COUPON,
                OrderDiscountInfo::DISCOUNT_HHZ_INTEGRAL,
                OrderDiscountInfo::DISCOUNT_HHZ_RED_PACKET,
            ],
        ],
        AppType::APPTYPE_MINIPROGRAM => [
            self::LIMIT_DISCOUNT => [
            ],
        ],
        AppType::APPTYPE_TUAN_MINIPROGRAM => [
            self::LIMIT_DISCOUNT => [
            ],
        ],
        AppType::APPTYPE_PARAGRAPH_MINIPROGRAM => [
            self::LIMIT_DISCOUNT => [
                OrderDiscountInfo::DISCOUNT_HHZ_COUPON,
            ],
        ],
    ];


}